package cn.wlinker.video.monitor.brand.hikversion.create.net;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Service;

/**
 * 海康sdk注册器
 * @author gxsjx
 * @version 1.0
 * @date 2022/11/22
 */
@Service
public class HCNetSdkRegister implements ApplicationListener<ContextRefreshedEvent>, DisposableBean {

    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        HCNetTools.init();
    }

    @Override
    public void destroy() {
        //todo 因异常原因暂时停用清理
        //Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
        //HCNetTools.clearUp();
    }
}
